﻿using System;
using Dgg.LearnYourTools.NUnit.C_Assertions.Support;
using NUnit.Framework;

namespace Dgg.LearnYourTools.NUnit.C_Assertions.a_Exceptions
{
	[TestFixture]
	public class _019_Catch
	{
		[Test]
		public void RangeCtor_ThrowVsCatch()
		{

			Assert.Catch<ArgumentException>(() => new Range<int>(-1, -5));
			try
			{
				Assert.Throws<ArgumentException>(() => new Range<int>(-1, -5));
			}
			catch (AssertionException)
			{
				Assert.Pass("it does not even like a subtype");
			}
		}
	}
}
